home *** CD-ROM | disk | FTP | other *** search
- Short: Sums all numbers from stdin
- Author: Angela Schmidt <Angela@rz.uni-karlsruhe.de>
-
- Sumstdin reads line by line from stdin. It tries to interpret each
- line as a number and sums all of these numbers. As soon as the end
- of the file is reached, it prints the total sum to stdout.
-
- Note: numbers read from stdin can be decimal, octal or hexadecimal
- and must have the following syntax:
-
- abc - decimal number
- 0xabc - hexadecimal number
- 0abc - octal number
-
- Examles: 805509488, 0712316, 0xA9C0B
- (decimal) (octal), (hexadecimal)
-
- Output always is a decimal number.
-
- Example:
-
- 1> list all files lformat "%l" | sumstdin
-
- This scans the whole directory and prints the sum of all filesizes.
-
-
- This program has been written to calculate the sizes for the
- FindPearls-database on the Meeting Pearls CD-ROMs and has been put
- into the public domain.
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 6664 4498 32.5% 24-Jun-95 17:02:04 sumstdin
- 892 488 45.2% 24-Jun-95 17:01:52 sumstdin.doc
- -------- ------- ----- --------- --------
- 7556 4986 34.0% 24-Jun-95 20:59:48 2 files
-